package com.itheima.mapper.omsMapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.itheima.domain.db.oms.OmsOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface OrderMapper extends BaseMapper<OmsOrder> {
    /**
     * 批量关闭订单
     *
     * @param id
     * @param note
     */
    @Update("update oms_order set note = #{note},status = 4 where id = #{id}")
    void updateClose(@Param("id") Integer id, @Param("note") String note);


    /**
     * 批量删除订单
     *
     * @param id
     */
    @Update("update oms_order set delete_status = 1 where id = #{id}")
    void updateDelete(@Param("id") Integer id);

}
